<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{faAccountGrpBean.id}"/>
		<f:event type="preRenderView" listener="#{faAccountGrpBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Fa Account Grp"/>

	<ui:define name="header">
		Fa Account Grp
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty faAccountGrpBean.id}">
				Edit existing Fa Account Grp
			</c:when>
			<c:otherwise>
				Create a new Fa Account Grp
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpAccGrpNo" value="Acc Grp No:"/>
				<h:panelGroup>
					<h:inputText id="faAccountGrpBeanFaAccountGrpAccGrpNo" required="true" value="#{faAccountGrpBean.faAccountGrp.accGrpNo}"/>
					<h:message for="faAccountGrpBeanFaAccountGrpAccGrpNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpFaAccountGrpLevel" value="Fa Account Grp Level:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{faAccountGrpLevelBean.converter}" id="faAccountGrpBeanFaAccountGrpFaAccountGrpLevel" value="#{faAccountGrpBean.faAccountGrp.faAccountGrpLevel}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{faAccountGrpLevelBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="faAccountGrpBeanFaAccountGrpFaAccountGrpLevel" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpAccGrpSeqNo" value="Acc Grp Seq No:"/>
				<h:panelGroup>
					<h:inputText id="faAccountGrpBeanFaAccountGrpAccGrpSeqNo" required="true" value="#{faAccountGrpBean.faAccountGrp.accGrpSeqNo}"/>
					<h:message for="faAccountGrpBeanFaAccountGrpAccGrpSeqNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText value="*"/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpAccGrpCode" value="Acc Grp Code:"/>
				<h:panelGroup>
					<h:inputText id="faAccountGrpBeanFaAccountGrpAccGrpCode" maxLength="50" value="#{faAccountGrpBean.faAccountGrp.accGrpCode}"/>
					<h:message for="faAccountGrpBeanFaAccountGrpAccGrpCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpAccGrpOrderByNo" value="Acc Grp Order By No:"/>
				<h:panelGroup>
					<h:inputText id="faAccountGrpBeanFaAccountGrpAccGrpOrderByNo" maxLength="50" value="#{faAccountGrpBean.faAccountGrp.accGrpOrderByNo}"/>
					<h:message for="faAccountGrpBeanFaAccountGrpAccGrpOrderByNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpAccGrpDescr" value="Acc Grp Descr:"/>
				<h:panelGroup>
					<h:inputText id="faAccountGrpBeanFaAccountGrpAccGrpDescr" maxLength="200" value="#{faAccountGrpBean.faAccountGrp.accGrpDescr}"/>
					<h:message for="faAccountGrpBeanFaAccountGrpAccGrpDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpFaChartOfAccounts" value="Fa Chart Of Accounts:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{faAccountGrpBean.faAccountGrp.faChartOfAccounts}"/>
					<h:dataTable id="faAccountGrpBeanFaAccountGrpFaChartOfAccounts" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Acc No"/>
							</f:facet>
							<h:link outcome="/faChartOfAccount/view">
								<f:param name="id" value="#{_item.accNo}"/>
								<h:outputText id="itemAccNo" value="#{_item.accNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="faChartOfAccountBeanAddAccNo" value="#{faChartOfAccountBean.add.accNo}"/>
								<h:message for="faChartOfAccountBeanAddAccNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Status Is Ctrl Acc"/>
							</f:facet>
							<h:link outcome="/faChartOfAccount/view">
								<f:param name="id" value="#{_item.accNo}"/>
								<h:outputText id="itemStatusIsCtrlAcc" value="#{_item.statusIsCtrlAcc}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="faChartOfAccountBeanAddStatusIsCtrlAcc" value="#{faChartOfAccountBean.add.statusIsCtrlAcc}"/>
								<h:message for="faChartOfAccountBeanAddStatusIsCtrlAcc" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(faChartOfAccountBean.added)}" id="faAccountGrpBeanFaAccountGrpFaChartOfAccountsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{faChartOfAccountBean.add.faAccountGrp}" value="#{faAccountGrpBean.faAccountGrp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForAccGrpNo" value="Fa Account Grp Subs For Acc Grp No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{faAccountGrpBean.faAccountGrp.faAccountGrpSubsForAccGrpNo}"/>
					<h:dataTable id="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForAccGrpNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Fa Account Grp By Sub Acc Grp No"/>
							</f:facet>
							<h:link outcome="/faAccountGrpSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemFaAccountGrpBySubAccGrpNo" value="#{forgeview:display(_item.faAccountGrpBySubAccGrpNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{faAccountGrpBean.converter}" id="faAccountGrpSubBeanAddFaAccountGrpBySubAccGrpNo" value="#{faAccountGrpSubBean.add.faAccountGrpBySubAccGrpNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{faAccountGrpBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="faAccountGrpSubBeanAddFaAccountGrpBySubAccGrpNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Acc Grp Descr"/>
							</f:facet>
							<h:link outcome="/faAccountGrpSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubAccGrpDescr" value="#{_item.subAccGrpDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="faAccountGrpSubBeanAddSubAccGrpDescr" maxLength="300" value="#{faAccountGrpSubBean.add.subAccGrpDescr}"/>
								<h:message for="faAccountGrpSubBeanAddSubAccGrpDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(faAccountGrpSubBean.added)}" id="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForAccGrpNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{faAccountGrpSubBean.add.faAccountGrpByAccGrpNo}" value="#{faAccountGrpBean.faAccountGrp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForSubAccGrpNo" value="Fa Account Grp Subs For Sub Acc Grp No:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{faAccountGrpBean.faAccountGrp.faAccountGrpSubsForSubAccGrpNo}"/>
					<h:dataTable id="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForSubAccGrpNo" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Fa Account Grp By Acc Grp No"/>
							</f:facet>
							<h:link outcome="/faAccountGrpSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemFaAccountGrpByAccGrpNo" value="#{forgeview:display(_item.faAccountGrpByAccGrpNo)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{faAccountGrpBean.converter}" id="faAccountGrpSubBeanAddFaAccountGrpByAccGrpNo" value="#{faAccountGrpSubBean.add.faAccountGrpByAccGrpNo}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{faAccountGrpBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="faAccountGrpSubBeanAddFaAccountGrpByAccGrpNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sub Acc Grp Descr"/>
							</f:facet>
							<h:link outcome="/faAccountGrpSub/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemSubAccGrpDescr" value="#{_item.subAccGrpDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="faAccountGrpSubBeanAddSubAccGrpDescr" maxLength="300" value="#{faAccountGrpSubBean.add.subAccGrpDescr}"/>
								<h:message for="faAccountGrpSubBeanAddSubAccGrpDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(faAccountGrpSubBean.added)}" id="faAccountGrpBeanFaAccountGrpFaAccountGrpSubsForSubAccGrpNoAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{faAccountGrpSubBean.add.faAccountGrpBySubAccGrpNo}" value="#{faAccountGrpBean.faAccountGrp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{faAccountGrpBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty faAccountGrpBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{faAccountGrpBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{faAccountGrpBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>